package com.shensi.api.admin.client.coupon;

import com.shensi.api.admin.client.fallback.common.CommonClientFallBack;
import com.shensi.api.admin.client.fallback.coupon.CouponIssueRelationClientFallBack;
import com.shensi.api.admin.domian.coupon.dto.CouponIssueRelationDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.common.core.utils.poi.ExcelUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CouponIssueRelationClientFallBack.class)
@Component
public interface CouponIssueRelationClient {

    /**
     * 查询发放方式，优惠劵信息列表
     */
    @GetMapping("/coupon/detail/list")
    public TableDataInfo list(@SpringQueryMap CouponIssueRelationDto couponIssueRelation);

    /**
     * 导出发放方式，优惠劵信息列表
     */
    @GetMapping("/coupon/detail/export")
    public AjaxResult export(@SpringQueryMap CouponIssueRelationDto couponIssueRelation);

    /**
     * 获取发放方式，优惠劵信息详细信息
     */
    @GetMapping(value = "/coupon/detail/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增发放方式，优惠劵信息
     */
    @PostMapping("/coupon/detail")
    public AjaxResult add(@RequestBody CouponIssueRelationDto couponIssueRelation);

    /**
     * 修改发放方式，优惠劵信息
     */
    @PutMapping("/coupon/detail")
    public AjaxResult edit(@RequestBody CouponIssueRelationDto couponIssueRelation);

    /**
     * 删除发放方式，优惠劵信息
     */
    @DeleteMapping("/coupon/detail/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);

}
